require("../../@babel/runtime/helpers/Arrayincludes"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/user/mobileLanding" ], {
    8282: function(e, t, n) {
        n.r(t);
        var o = n("bd2a"), r = n("ebff");
        for (var i in r) "default" !== i && function(e) {
            n.d(t, e, function() {
                return r[e];
            });
        }(i);
        n("ebc8");
        var a = n("f0c5"), u = Object(a.a)(r.default, o.b, o.c, !1, null, "9fa97258", null, !1, o.a, void 0);
        t.default = u.exports;
    },
    "9f39": function(e, t, n) {
        (function(e) {
            n("1067"), o(n("66fd"));
            var t = o(n("8282"));
            function o(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = n, e(t.default);
        }).call(this, n("543d").createPage);
    },
    bba6: function(e, t, n) {
        (function(e) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var o = n("a71e"), r = n("7a6d"), i = (n("a461"), n("26cb")), a = c(n("03b8")), u = (n("db8f"), 
            c(n("801c")));
            function c(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            function s(e, t) {
                var n = Object.keys(e);
                if (Object.getOwnPropertySymbols) {
                    var o = Object.getOwnPropertySymbols(e);
                    t && (o = o.filter(function(t) {
                        return Object.getOwnPropertyDescriptor(e, t).enumerable;
                    })), n.push.apply(n, o);
                }
                return n;
            }
            function f(e, t, n) {
                return t in e ? Object.defineProperty(e, t, {
                    value: n,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : e[t] = n, e;
            }
            var l = {
                data: function() {
                    return {
                        textPhone: "",
                        textCode: "",
                        btnText: "",
                        passWord: "",
                        btnwz: "获取验证码",
                        time: 60,
                        timer: "",
                        value: "phone",
                        valueText: "验证码登录",
                        backUrl: "",
                        registered: !1
                    };
                },
                computed: function(e) {
                    for (var t = 1; t < arguments.length; t++) {
                        var n = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? s(Object(n), !0).forEach(function(t) {
                            f(e, t, n[t]);
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : s(Object(n)).forEach(function(t) {
                            Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
                        });
                    }
                    return e;
                }({}, (0, i.mapGetters)([ "configs", "user", "mainColor" ])),
                onLoad: function(t) {
                    this.backUrl = decodeURIComponent(t.backLoginUrl), (0, o.isEmpty)(this.backUrl) || e.setStorage({
                        key: "backLoginUrl" + a.default.uniacid,
                        data: this.backUrl,
                        success: function() {}
                    });
                },
                mounted: function() {
                    this.btnText = this.mainColor;
                },
                methods: {
                    getCode: function() {
                        var t = this;
                        if ((0, o.isEmpty)(this.textPhone)) return e.showToast({
                            title: "请填写手机号码",
                            icon: "",
                            duration: 2e3
                        });
                        if (!(0, o.isPhoneNumber)(this.textPhone)) return e.showToast({
                            title: "请填写正确的手机号码",
                            icon: "",
                            duration: 2e3
                        });
                        if ("获取验证码" !== t.btnwz) return !1;
                        var n = {
                            phone: this.textPhone
                        };
                        (0, r.phoneCode)(n).then(function(e) {}), t.getNumCode(t.time), t.timer = setInterval(function() {
                            t.getNumCode(t.time--);
                        }, 1e3);
                    },
                    getNumCode: function(e) {
                        var t = this;
                        e <= 0 ? (clearInterval(t.timer), t.btnText = "grey", t.btnwz = "获取验证码", t.time = 60) : (t.btnText = "#ccc", 
                        t.btnwz = "重新发送(" + e + ")");
                    },
                    codeLogin: function() {
                        var e = this;
                        e.value = "phone" == e.value ? "code" : "phone", e.valueText = "phone" == e.value ? "验证码登录" : "账号密码登录";
                    },
                    register: function() {
                        e.navigateTo({
                            url: "/pages/user/register",
                            animationType: "pop-in",
                            animationDuration: 200
                        });
                    },
                    fotgot: function() {
                        e.navigateTo({
                            url: "/pages/user/forgot",
                            animationType: "pop-in",
                            animationDuration: 200
                        });
                    },
                    returnUrl: function() {
                        e.getStorage({
                            key: "backLoginUrl" + a.default.uniacid,
                            success: function(t) {
                                var n = t.data;
                                n.includes("mobileLanding") ? (console.log(window.location.href), e.reLaunch({
                                    url: "/diy/diy/index"
                                })) : e.reLaunch({
                                    url: n
                                });
                            }
                        });
                    },
                    save: function() {
                        var t = this;
                        if ((0, o.isEmpty)(this.textPhone)) return e.showToast({
                            title: "请填写手机号码",
                            icon: "",
                            duration: 2e3
                        });
                        if (!(0, o.isPhoneNumber)(this.textPhone)) return e.showToast({
                            title: "请填写正确的手机号码",
                            icon: "",
                            duration: 2e3
                        });
                        if ((0, o.isEmpty)(this.passWord) && "phone" == t.value) return e.showToast({
                            title: "请填写密码",
                            icon: "",
                            duration: 2e3
                        });
                        if ((0, o.isEmpty)(this.textCode) && "code" == t.value) return e.showToast({
                            title: "请填写验证码",
                            icon: "",
                            duration: 2e3
                        });
                        var n = {
                            type: "phone" == t.value ? "1" : "2",
                            phone: t.textPhone,
                            password: t.passWord,
                            phoneCode: t.textCode
                        };
                        (0, r.phoneLogin)(n).then(function(n) {
                            e.setStorage({
                                key: "userInfo" + a.default.uniacid,
                                data: JSON.stringify(n),
                                success: function(e) {
                                    u.default.commit("config/SET_USER", n), t.returnUrl();
                                }
                            });
                        });
                    }
                }
            };
            t.default = l;
        }).call(this, n("543d").default);
    },
    bd2a: function(e, t, n) {
        n.d(t, "b", function() {
            return o;
        }), n.d(t, "c", function() {
            return r;
        }), n.d(t, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, r = [];
    },
    ebc8: function(e, t, n) {
        var o = n("faac");
        n.n(o).a;
    },
    ebff: function(e, t, n) {
        n.r(t);
        var o = n("bba6"), r = n.n(o);
        for (var i in o) "default" !== i && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(i);
        t.default = r.a;
    },
    faac: function(e, t, n) {}
}, [ [ "9f39", "common/runtime", "common/vendor" ] ] ]);